<?php
    //ROOT_PATH
    define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
    define('ROOT_PATH', str_replace(SELF, '', __FILE__));

    //BASE_URL
    $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
    $base_url .= '://'. $_SERVER['HTTP_HOST'];
    $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
    define('ROOT_URL', $base_url);

    require_once 'libs/config.php';
    require_once 'libs/libs.php';
    require_once 'libs/phpmailer/mailer.php';
    require_once 'libs/controller.php';
    require_once 'libs/view.php';
    require_once 'libs/database.php';
    require_once 'libs/model.php';
    require_once 'libs/session.php';
    //Custom bar content
    require_once ROOT_PATH.'controllers/bar.php';
    require_once 'libs/buzzy.php';

    $buzzy = new Buzzy();
?>